package signGrammar;

import java.awt.Graphics;
import java.awt.Point;

/**
 * IShape define primitive interface.<br>
 * All of primitives has HEAD and TAIL,
 * it can print itself and clone for two different ways.
 * */
public interface IShape {
	
	/**
	 * @return head of the shape
	 * */
	public Point getHead();
	
	/**
	 * @return tail of the shape
	 * */
	public Point getTail();
	
	/**
	 * @return shape itself<br>
	 * last line of method should be:
	 * <code>return this;</code>
	 * */
	public IShape print(Graphics graphics);
	
	/**
	 * Clones this shape, new one's head is in given point.
	 * @return cloned shape
	 * */
	public IShape cloneForHead(Point headPoint);
	
	/**
	 * Clones this shape, new one's tail is in given point.
	 * @return cloned shape
	 * */
	public IShape cloneForTail(Point tailPoint);
}
